package creational_pattern.factory.factory_method;

import creational_pattern.factory.factory_method.Coffee;
import creational_pattern.factory.factory_method.CoffeeFactory;

public class Store {

    private CoffeeFactory coffeeFactory;

    public void setCoffeeFactory(CoffeeFactory coffeeFactory) {
        this.coffeeFactory = coffeeFactory;
    }

    public Coffee order(String coffeeType) {
        Coffee coffee = coffeeFactory.createCoffee();

        coffee.addMilk();
        coffee.addSugar();

        return coffee;

    }
}
